package com.tanhua.dubbo.api;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;

import com.tanhua.dubbo.mappers.OptionMapper;
import com.tanhua.model.domain.Options;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Set;

@DubboService
public class OptionApiImpl implements OptionApi {
    @Autowired
    private OptionMapper optionMapper;
    @Override
    public List<Options> option(Set<Long> longs) {
        LambdaQueryWrapper<Options> lqw =new LambdaQueryWrapper<>();
        lqw.in(Options::getSoulId,longs);
        List<Options> options = optionMapper.selectList(lqw);
        return options;
    }

    @Override
    public  List<Options> getScore( List<Long> optionIds) {
        LambdaQueryWrapper<Options> lqw =new LambdaQueryWrapper<>();
        lqw.in(Options::getId,optionIds);
        List<Options> options = optionMapper.selectList(lqw);
        return options;
    }
}
